package org.come.Jpanel;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 * 类说明
 * 
 * @author 黄建彬
 * @date 2017年12月24日 新建
 * 
 * 
 * 用来进行错误提示或者消息提示框
 */ 

public class MessageErrorPromptJpanel extends JPanel{

	
	private JLabel  sure,cancle;//确定，取消按钮
	public MessageErrorPromptJpanel() {
		
		this.setPreferredSize(new Dimension(400,200));
		this.setLayout(null);

		//设置按钮
		sure=new JLabel("确定");
		sure.setBounds(90, 150, 60,25);
		sure.setFont(new Font("微软雅黑",   1,   14)); 
		//设置字体
		sure.setForeground(Color.yellow);
		cancle=new JLabel("取消");
		cancle.setBounds(260, 150, 60,25);
		cancle.setFont(new Font("微软雅黑",   1,   14)); 
		//设置字体
		cancle.setForeground(Color.yellow);
		this.add(sure);
		this.add(cancle);
	}
	@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		
		g.drawImage(new ImageIcon("img/loginimg/111.png").getImage(), 0, 0, 400,200, this);
		//按键背景

		g.drawImage(new ImageIcon("inkImg/hongmu/2/btn_anniu0000(1).png").getImage(), 80, 150, 60,25, this);
		
		g.drawImage(new ImageIcon("inkImg/hongmu/2/btn_anniu0000(1).png").getImage(), 250, 150, 60,25, this);
		
	}

}
